import createRe from './create.art'
class Create {
    constructor(jq, layer) {
        if (jq === undefined) {
            return 0;
        }

        this.jq = jq;
        this.layer = layer;
    }

    init(data) {
        const _this = this;
        const $ = _this.jq;
        const layer = _this.layer;
        const crateHtml = createRe(data);

        $('#etable-box .etable-create').click(function() {
            // layer.open({
            //     type: 1,
            //     skin: 'layui-layer-demo', //样式类名
            //     closeBtn: 1, //不显示关闭按钮
            //     anim: 2,
            //     shadeClose: true, //开启遮罩关闭
            //     content: crateHtml
            // });
            layer.confirm(crateHtml, {
                type: 1,
                btn: ['保存', '取消'] //按钮
            }, function(ele) {

            }, function() {

            });
        });
    }
}

export default Create;